<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    const arr = [1, 2, 3, 4, 5]
    const obj = {name: 'jack', arr: [5, 10, 15]}

    for (item in arr) {
        console.log(item)  // 下标
    }

    for (item of arr) {
        console.log(item) // 元素
    }

    for (item in obj) {
        console.log(item) // 属性
        console.log(obj[item])
    }


</script>
</body>
</html>